package com.example.baseui2.main

import android.content.Intent
import android.os.Handler
import android.view.View
import com.example.baseui2.BR
import com.example.baseui2.R
import com.example.baseui2.databinding.ActivityMainBinding
import com.example.baseui2.netWork.NetWorkActivity
import com.example.baseui2.recycleVIew.RecycleViewActivity
import com.example.baseui2.viewbind.ViewBindActivity
import com.whr.baseui.activity.BaseMvvmActivity

class MainActivity : BaseMvvmActivity<ActivityMainBinding, MainViewModel>() {

    override val layoutId: Int
        get() = R.layout.activity_main

    override fun initVariableId(): Int {
        return BR.mainVM
    }

    override fun initView(rootView: View) {

    }

    fun setOnBtnClick(view: View) {
        when (view.id) {
            R.id.btn_normal_view -> {
                startActivity(Intent(mActivity, ViewBindActivity::class.java))
            }
            R.id.btn_recycle_view -> {
                startActivity(Intent(mActivity, RecycleViewActivity::class.java))
            }
            R.id.btn_network -> {
                startActivity(Intent(mActivity, NetWorkActivity::class.java))
            }
        }
    }

}